﻿using ContactCenter.Core;
using NHibernate.Cache;
using NHibernate.Cfg;

namespace ContactCenter.Persistence.NH.Tasks
{
    public class OtherSettingsTask : TaskBase
    {
        public override bool CanConfigureCore()
        {
            return App.IsWeb();
        }
        public override Configuration Configure(Configuration configuration)
        {
            configuration.SetProperty(Environment.CurrentSessionContextClass, "web");
            configuration.SetProperty(Environment.CacheProvider, typeof(HashtableCacheProvider).AssemblyQualifiedName);
            return configuration;
        }
        
        public override int Position
        {
            get { return 20; }
        }
    }

}